export default [
  {
    url: '/api/login',
    method: 'post',
    response: () => {
      return {
        code: 200,
        message: 'success',
        data: {
          token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJhdhwIjoxNjI3NTMxNjcwfQ'
        }
      }
    }
  },
  {
    url: '/api/guest/login',
    method: 'post',
    response: () => {
      return {
        code: 200,
        message: 'success',
        data: {
          token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJhdhwIjoxNjI3NTMxNjcwfQ'
        }
      }
    }
  },
  {
    url: '/api/getUserInfo',
    method: 'get',
    response: () => {
      return {
        code: 200,
        data: {
          userInfo: { userName: 'admin', role: 'admin' },
          menus: [
            {
              name: 'index',
              path: '/',
              component: 'components/Layout/index',
              redirect: '/home',
              meta: { title: '首页', icon: 'home' },
              children: [
                {
                  path: '/home',
                  name: 'home',
                  meta: { title: '首页', icon: 'home' },
                  component: 'views/home/Home'
                }
              ]
            },
            {
              name: 'list',
              path: '/list',
              component: 'components/Layout/index',
              redirect: '/list/table',
              meta: {
                title: '列表',
                icon: 'table'
              },
              children: [
                {
                  path: '/list/table',
                  name: 'table',
                  meta: {
                    title: '列表',
                    icon: 'table',
                    auth: ['create', 'edit']
                  },
                  component: 'views/table/Table'
                }
              ]
            },
            {
              name: 'icons',
              path: '/icons',
              component: 'components/Layout/index',
              redirect: '/icons/svglist',
              meta: {
                title: '图标',
                icon: 'icon'
              },
              children: [
                {
                  path: '/icons/svglist',
                  name: 'svglist',
                  meta: {
                    title: '图标',
                    icon: 'icon'
                  },
                  component: 'views/icons/Icons'
                }
              ]
            },
            {
              path: '/error',
              name: 'error',
              component: 'components/Layout/index',
              redirect: '/404',
              meta: {
                title: '错误页面',
                icon: '404'
              },
              children: [
                {
                  // 404路由
                  path: '/error/404',
                  name: '404',
                  meta: {
                    title: '404',
                    icon: '404'
                  },
                  component: 'views/error/404'
                },
                {
                  // 401路由
                  path: '/error/401',
                  name: '401',
                  meta: {
                    title: '401',
                    icon: '401'
                  },
                  component: 'views/error/401'
                }
              ]
            }
          ]
        }
      }
    }
  },
  {
    url: '/api/guest/getUserInfo',
    method: 'get',
    response: () => {
      return {
        code: 200,
        data: {
          userInfo: { userName: 'guest', role: 'guest' },
          menus: [
            {
              name: 'index',
              path: '/',
              component: 'components/Layout/index',
              redirect: '/home',
              meta: { title: '首页', icon: 'home' },
              children: [
                {
                  path: '/home',
                  name: 'home',
                  meta: { title: '首页', icon: 'home' },
                  component: 'views/home/Home'
                }
              ]
            },
            {
              name: 'list',
              path: '/list',
              component: 'components/Layout/index',
              redirect: '/list/table',
              meta: {
                title: '列表',
                icon: 'table'
              },
              children: [
                {
                  path: '/list/table',
                  name: 'table',
                  meta: {
                    title: '列表',
                    icon: 'table',
                    auth: ['edit']
                  },
                  component: 'views/table/Table'
                }
              ]
            }
          ]
        }
      }
    }
  }
]
